home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / tcomm6.zip / LCLIB.EXE / LCPXM.H < prev    next >
Text File  |  1991-08-28  |  2KB  |  67 lines

  1. /*
  2. **    lcpxm.h - xmodem engine for litecomm - header file
  3. **               Copyright (c) 1991 - Information Technology, Ltd.
  4. **               All Rights Reserved
  5. **    REVISIONS
  6. **        01        05/20/91        modified to support multiports
  7. */
  8.  
  9. /*
  10. **    ASCII and XMODEM control characters
  11. */
  12.  
  13. #define SOH 1                    /* start of header */
  14. #define STX 2                   /* start of text - YModem variant */
  15. #define EOT 4                    /* end of transmission */
  16. #define ACK 6                    /* true acknowledge */
  17. #define NAK 0x15                /* false acknowledge */
  18. #define DLE 0x10                /* DLE char for WXmodem */
  19. #define SYN 0x16                /* SYN char for WXmodem */
  20. #define CRC 'C'                    /* request CRC mode */
  21. #define CAN 0x18                /* cancel transmission */
  22.  
  23. /*
  24. **    User accessable system equates
  25. */
  26.  
  27. #define RETRY        25                 /* no. of retrys before abort */
  28. #define RECSIZE      128                /* transfer record size */
  29. #define YMRECSIZE   1024                /* transfer record size */
  30. #define NORMAL         1                /* normal xmodem timeouts */
  31. #define RELAXED        3                /* relaxed (longer) timeouts */
  32.  
  33. /*
  34. ** additional constants used for status codes from x,ymodem
  35. ** routines
  36. */
  37. #define SUCCESS        ('S')
  38. #define RETRIES        ('R')
  39. #define TOUT        ('T')
  40. #define RESEND      ('E')
  41. #define DUPSEQ        ('D')
  42. #define ABORTED        ('A')
  43. #define FATAL        ('F')
  44. #define FATALIO        ('I')
  45.  
  46. #define    WAITSOH        1                    /* Waiting for SOH */
  47. #define    WAITBLK        2                    /* Waiting for Block */
  48. #define    WAITHDSK    3                    /* Waiting for Handshake */
  49. #define    WAITACK        4                    /* Waiting for Acknowledgement */
  50. #define WAITFNB        5                    /* Waiting for File Name Block */
  51. #define XDISKERR    14                    /* Disk read/write Error */
  52. #define XGOTFILE    18                    /* Got File Name Block */
  53. #define XBADFILE    19                    /* Can't find file */
  54.  
  55. /*
  56. ** function prototypes
  57. */
  58.  
  59. void updcrc(PROTO *, unsigned char);
  60. int lcxteot(PROTO *);
  61. int lcpxmrec(PROTO *);
  62. int lcpxmsnd(PROTO *p);
  63. void lcym_send(PROTO *, char **);
  64. void lcym_recv(PROTO *, char *);
  65. int lwxtrec(unsigned, unsigned char *, int *);
  66. int lwxrrec(unsigned, unsigned char *);
  67.